<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>DIST-Nx Sensor<br/>
<small>
[<a class="el" href="group__mindsensors.html">Mindsensors</a>]</small>
</h1>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="files"></a>
Files</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mindsensors-irdist_8h.html">mindsensors-irdist.h</a></td></tr>

<p><tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>Mindsensors DIST-Nx driver. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#gaa0acc67b016663695c6d56209744c2d4">MSDIST_I2C_ADDR</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#gaab74285be52c673f8a64b257243b58b7">MSDIST_CMD</a>&#160;&#160;&#160;0x41</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#gac19548612f6169b70100da2615087d5d">MSDIST_DIST</a>&#160;&#160;&#160;0x42</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga27dc507c301c1c400b35edf6bdb8872e">MSDIST_VOLT</a>&#160;&#160;&#160;0x44</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga68127178ad2bdd4cca035a30cd06cb65">MSDIST_MOD_TYPE</a>&#160;&#160;&#160;0x50</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga767d8fd4072d1be7c2043af0f5199d1c">MSDIST_MINDIST</a>&#160;&#160;&#160;0x52</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga325dab7fc0bd0c065d41941eea2e5e28">MSDIST_MAXDIST</a>&#160;&#160;&#160;0x54</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#gad60276924b4b8bc56d60480d33110051">MSDIST_GP2D12</a>&#160;&#160;&#160;0x31</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#gaca985347e2d1ec1bce26af8ac8aff12d">MSDIST_GP2D120</a>&#160;&#160;&#160;0x32</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga958340025be224b9008490ad04412591">MSDIST_GP2YA21</a>&#160;&#160;&#160;0x33</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga6660666763ce1ed208cd5dacafea1fab">MSDIST_GP2YA02</a>&#160;&#160;&#160;0x34</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#gaeea311f521348db82b058977609f9898">MSDIST_CUSTOM</a>&#160;&#160;&#160;0x35</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#gaeeda2b56ad4d52d5b1193baf5bf88723">MSDISTreadDist</a> (tSensors link, ubyte address=MSDIST_I2C_ADDR)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga7219869563624f73f06664d7d2c87e14">MSDISTreadVoltage</a> (tSensors link, ubyte address=MSDIST_I2C_ADDR)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga3d87990cb848e2a6a98fdd9dc7aa15e0">MSDISTreadMinDist</a> (tSensors link, ubyte address=MSDIST_I2C_ADDR)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#gae96736e03c9eedc181771494dfbc9455">MSDISTreadMaxDist</a> (tSensors link, ubyte address=MSDIST_I2C_ADDR)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#gadfb19f55b0e87638753d5e3d894479c0">MSDISTreadModuleType</a> (tSensors link, ubyte address=MSDIST_I2C_ADDR)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga7d6b020d134bc2b8e8dbc29cc4224465">MSDISTsendCmd</a> (tSensors link, byte command, ubyte address=MSDIST_I2C_ADDR)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga81d5688a30879742237113da30095371">MSDIST_I2CRequest</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#ga76307108433f2f05c07a9b18a9017f0e">MSDIST_I2CReply</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__msdist.html#gae4948e6f2245f8cb510c2faadb99b094">MSDISTcalibrated</a> [] = {false, false, false, false}</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>DIST-Nx Sensor </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="gaab74285be52c673f8a64b257243b58b7"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_CMD" ref="gaab74285be52c673f8a64b257243b58b7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_CMD&#160;&#160;&#160;0x41</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>MSDIST command register </p>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00046">46</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaeea311f521348db82b058977609f9898"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_CUSTOM" ref="gaeea311f521348db82b058977609f9898" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_CUSTOM&#160;&#160;&#160;0x35</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Custom IR module </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-irdist-test1_8c-example.html#a7">mindsensors-irdist-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00058">58</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="gac19548612f6169b70100da2615087d5d"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_DIST" ref="gac19548612f6169b70100da2615087d5d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_DIST&#160;&#160;&#160;0x42</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>MSDIST distance data </p>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00048">48</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="gad60276924b4b8bc56d60480d33110051"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_GP2D12" ref="gad60276924b4b8bc56d60480d33110051" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_GP2D12&#160;&#160;&#160;0x31</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sharp IR module GP2D12 </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-irdist-test1_8c-example.html#a3">mindsensors-irdist-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00054">54</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaca985347e2d1ec1bce26af8ac8aff12d"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_GP2D120" ref="gaca985347e2d1ec1bce26af8ac8aff12d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_GP2D120&#160;&#160;&#160;0x32</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sharp IR module GP2D120 </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-irdist-test1_8c-example.html#a4">mindsensors-irdist-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00055">55</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga6660666763ce1ed208cd5dacafea1fab"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_GP2YA02" ref="ga6660666763ce1ed208cd5dacafea1fab" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_GP2YA02&#160;&#160;&#160;0x34</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sharp IR module GP2YA02 </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-irdist-test1_8c-example.html#a5">mindsensors-irdist-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00057">57</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga958340025be224b9008490ad04412591"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_GP2YA21" ref="ga958340025be224b9008490ad04412591" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_GP2YA21&#160;&#160;&#160;0x33</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sharp IR module GP2YA21 </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-irdist-test1_8c-example.html#a6">mindsensors-irdist-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00056">56</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaa0acc67b016663695c6d56209744c2d4"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_I2C_ADDR" ref="gaa0acc67b016663695c6d56209744c2d4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_I2C_ADDR&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>MSDIST I2C device address </p>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00044">44</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga325dab7fc0bd0c065d41941eea2e5e28"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_MAXDIST" ref="ga325dab7fc0bd0c065d41941eea2e5e28" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_MAXDIST&#160;&#160;&#160;0x54</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>MSDIST maximum distance in mm </p>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00052">52</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga767d8fd4072d1be7c2043af0f5199d1c"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_MINDIST" ref="ga767d8fd4072d1be7c2043af0f5199d1c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_MINDIST&#160;&#160;&#160;0x52</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>MSDIST minimum distance in mm </p>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00051">51</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga68127178ad2bdd4cca035a30cd06cb65"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_MOD_TYPE" ref="ga68127178ad2bdd4cca035a30cd06cb65" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_MOD_TYPE&#160;&#160;&#160;0x50</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>MSDIST Sharp module type </p>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00050">50</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga27dc507c301c1c400b35edf6bdb8872e"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_VOLT" ref="ga27dc507c301c1c400b35edf6bdb8872e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSDIST_VOLT&#160;&#160;&#160;0x44</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>MSDIST voltage data </p>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00049">49</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gaeeda2b56ad4d52d5b1193baf5bf88723"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDISTreadDist" ref="gaeeda2b56ad4d52d5b1193baf5bf88723" args="(tSensors link, ubyte address=MSDIST_I2C_ADDR)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MSDISTreadDist </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ubyte&#160;</td>
          <td class="paramname"> <em>address</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read the distance from the sensor </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the sensor port number </td></tr>
    <tr><td class="paramname">address</td><td>the I2C address to use, optional, defaults to 0x02 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>distance to object or -1 if an error occurred </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-irdist-test1_8c-example.html#a8">mindsensors-irdist-test1.c</a>, and <a class="el" href="mindsensors-motormux-test2_8c-example.html#a7">mindsensors-motormux-test2.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00078">78</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae96736e03c9eedc181771494dfbc9455"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDISTreadMaxDist" ref="gae96736e03c9eedc181771494dfbc9455" args="(tSensors link, ubyte address=MSDIST_I2C_ADDR)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MSDISTreadMaxDist </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ubyte&#160;</td>
          <td class="paramname"> <em>address</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read maximum measuring distance from the sensor </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the sensor port number </td></tr>
    <tr><td class="paramname">address</td><td>the I2C address to use, optional, defaults to 0x02 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>maximum measuring distance from the sensor -1 if an error occurred </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-irdist-test1_8c-example.html#a1">mindsensors-irdist-test1.c</a>, and <a class="el" href="mindsensors-motormux-test2_8c-example.html#a6">mindsensors-motormux-test2.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00150">150</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga3d87990cb848e2a6a98fdd9dc7aa15e0"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDISTreadMinDist" ref="ga3d87990cb848e2a6a98fdd9dc7aa15e0" args="(tSensors link, ubyte address=MSDIST_I2C_ADDR)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MSDISTreadMinDist </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ubyte&#160;</td>
          <td class="paramname"> <em>address</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read minumum measuring distance from the sensor </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the sensor port number </td></tr>
    <tr><td class="paramname">address</td><td>the I2C address to use, optional, defaults to 0x02 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>minumum measuring distance from the sensor -1 if an error occurred </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-irdist-test1_8c-example.html#a0">mindsensors-irdist-test1.c</a>, and <a class="el" href="mindsensors-motormux-test2_8c-example.html#a5">mindsensors-motormux-test2.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00129">129</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="gadfb19f55b0e87638753d5e3d894479c0"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDISTreadModuleType" ref="gadfb19f55b0e87638753d5e3d894479c0" args="(tSensors link, ubyte address=MSDIST_I2C_ADDR)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MSDISTreadModuleType </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ubyte&#160;</td>
          <td class="paramname"> <em>address</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read Sharp IR module type from the sensor </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the sensor port number </td></tr>
    <tr><td class="paramname">address</td><td>the I2C address to use, optional, defaults to 0x02 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Sharp IR module type from the sensor -1 if an error occurred </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-irdist-test1_8c-example.html#a2">mindsensors-irdist-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00171">171</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga7219869563624f73f06664d7d2c87e14"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDISTreadVoltage" ref="ga7219869563624f73f06664d7d2c87e14" args="(tSensors link, ubyte address=MSDIST_I2C_ADDR)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MSDISTreadVoltage </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ubyte&#160;</td>
          <td class="paramname"> <em>address</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read tilt data from the sensor </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the sensor port number </td></tr>
    <tr><td class="paramname">address</td><td>the I2C address to use, optional, defaults to 0x02 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>voltage reading from IR Sensor -1 if an error occurred </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mindsensors-irdist-test1_8c-example.html#a9">mindsensors-irdist-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00108">108</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga7d6b020d134bc2b8e8dbc29cc4224465"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDISTsendCmd" ref="ga7d6b020d134bc2b8e8dbc29cc4224465" args="(tSensors link, byte command, ubyte address=MSDIST_I2C_ADDR)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool MSDISTsendCmd </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">byte&#160;</td>
          <td class="paramname"> <em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ubyte&#160;</td>
          <td class="paramname"> <em>address</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Send a command to the sensor </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the sensor port number </td></tr>
    <tr><td class="paramname">command</td><td>the command to be sent </td></tr>
    <tr><td class="paramname">address</td><td>the I2C address to use, optional, defaults to 0x02 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if no error occured, false if it did </dd></dl>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00192">192</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="ga76307108433f2f05c07a9b18a9017f0e"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_I2CReply" ref="ga76307108433f2f05c07a9b18a9017f0e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__msdist.html#ga76307108433f2f05c07a9b18a9017f0e">MSDIST_I2CReply</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold I2C reply data </p>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00068">68</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga81d5688a30879742237113da30095371"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDIST_I2CRequest" ref="ga81d5688a30879742237113da30095371" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common.html#gaa172ef131853460e5b9f5c6db81d30f4">tByteArray</a> <a class="el" href="group__msdist.html#ga81d5688a30879742237113da30095371">MSDIST_I2CRequest</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array to hold I2C command data </p>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00067">67</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae4948e6f2245f8cb510c2faadb99b094"></a><!-- doxytag: member="mindsensors&#45;irdist.h::MSDISTcalibrated" ref="gae4948e6f2245f8cb510c2faadb99b094" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="group__msdist.html#gae4948e6f2245f8cb510c2faadb99b094">MSDISTcalibrated</a>[] = {false, false, false, false}</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Has the sensor been calibrated yet? </p>

<p>Definition at line <a class="el" href="mindsensors-irdist_8h_source.html#l00070">70</a> of file <a class="el" href="mindsensors-irdist_8h_source.html">mindsensors-irdist.h</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:44 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
